import { modelAdd, modelRemove } from './modelOpera.js';

let allObject = [];

class LSAJGFrameAdd {
  constructor(scene) {
    const modelData = [
      { url: './model/防雷柜体.fbx', num: 1, x: 0, y: 0, z: 0 },
      { url: './model/联锁A机内部.fbx', num: 1, x: 28, y: -8.5, z: 2.3 },
      { url: './model/CTC工控机柜2.fbx', num: 1, x: 25, y: 17.5, z: 5 },
      { url: './model/CTC工控机柜2.fbx', num: 1, x: 25, y: -23.9, z: 5 },
      {
        url: './model/联锁B机柜内部开关.fbx', children: [
          { num: 4, x: 28, y: 41, z: 21, offsetZ: -10.8 },
          { num: 2, x: 28, y: -2, z: 21, offsetZ: -4.5 },
        ]
      },
      { url: './model/防雷柜门框.fbx', num: 1, x: 37, y: -30, z: 5 },
      { url: './model/防雷柜玻璃门.fbx', num: 1, x: 37, y: -30, z: 5 },
    ];
    new modelAdd(modelData, (group) => {
      group.position.set(-308, -3.5, 105);
      scene.add(group);
      allObject = group;
    });
  }
}
class LSAJGFrameRemove {
  constructor(scene) {
    new modelRemove(scene, allObject);
  }
}
export { LSAJGFrameAdd, LSAJGFrameRemove };